package com.ymatou.iapi.godmch.testcase.old;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.godmch.parameter.CreateCodeBean;
import com.ymatou.iapi.godmch.parameter.viewBean;
import com.ymatou.iapi.godmch.service.viewCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
/**
*查看邀请码
*FreeMaker Template自动生成代码
*/
@TestSuite
@Deprecated
//接口 废弃
public class Ts_view{
	private static viewBean viewbean;
	private static viewCall viewcall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("查看邀请码");
	}

	@Before
	public void caseUp() {
		viewbean=new viewBean();
		viewcall=new viewCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(viewcall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_001() {
		Logger.start(true,"查看邀请码,验证全是永久-同一代理类型的永久有效期邀请码");
		try {
			CreateCodeBean bean = GodmchManageCallService.CreateAllMsgSellerMch();
			String code = GodmchManageCallService.createCodeCall(bean).getCode();
			viewbean.setMchId(bean.getMchId());
			viewbean.setPageIndex(1);
			viewbean.setPageSize(10);
			viewbean.setCodeRole(1);
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_002() {
		Logger.start(true,"查看邀请码,验证全都不是永久用效-代理商非永久类型的邀请码");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_003() {
		Logger.start(true,"查看邀请码,验证全都不是永久用效-客服非永久类型的邀请码");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_004() {
		Logger.start(true,"查看邀请码,验证部分永久+部分非永久-代理商邀请码");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_005() {
		Logger.start(true,"查看邀请码,验证已经作废了");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_006() {
		Logger.start(true,"查看邀请码,验证已经使用");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_007() {
		Logger.start(true,"查看邀请码,验证商户Id不存在,返回错误");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_008() {
		Logger.start(true,"查看邀请码,验证邀请码不存在,返回错误");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_009() {
		Logger.start(true,"查看邀请码,验证pageIndex=0,返回错误");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_010() {
		Logger.start(true,"查看邀请码,验证pageIndex=99999999");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_011() {
		Logger.start(true,"查看邀请码,验证pageSize,邀请码个数大于当前页显示总数,第二页显示");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_View_012() {
		Logger.start(true,"查看邀请码,验证pageSize=999999");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			viewcall.setData(viewbean);
			viewcall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}